package com.app.ui.ui2;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Map;

import org.jgraph.JGraph;
import org.jgraph.graph.DefaultEdge;
import org.jgraph.graph.DefaultGraphModel;
import org.jgraph.graph.GraphModel;
import com.app.data.MethodNode;
import com.app.data.Methods;

public class mData {

	public static ArrayList<mCell> mCells = new ArrayList<mCell>();
	public static ArrayList<MethodNode> mNodes = new ArrayList<>();
	public static MethodNode mBaseNode;
	public static Methods selectedMethod;
	public static Map<Object, Object> attributes = new Hashtable<Object, Object>();
	public static int judge_root = 0;
	public static int judge_son = 0;
	public static int judge_brother = 0;
	public static ArrayList<DefaultEdge> mEdges = new ArrayList<DefaultEdge>();;
	public static GraphModel model = new DefaultGraphModel();
	public static JGraph graph = new JGraph(model);
	
	mData() {}

	public static void clearData() {
		
		selectedMethod = null;
		mCells.clear();
		mNodes.clear();
		mEdges.clear();
		attributes.clear();
		judge_root = 0;
		judge_son = 0;
		judge_brother = 0;
		model = new DefaultGraphModel();
		graph = new JGraph(model);
	}
}
